/* 视频号发布 */
import request from '@/utils/request';
import {object2Url} from "@/utils/trans";

//视频号新增添加
export async function publishVideo (data) {
  const res = await request.post('/business/matrixsphpublish/publish', data)
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}

//爆店码——视频号发布
export async function sphShopQrIssue (data) {
  const res = await request.post('/business/mobile/sphShopQrIssue', data)
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}


//视频号发布
export async function publishCreateVideo (data) {
  const res = await request.post('/business/matrixsphpublish/sphQrIssue', data)
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}

// 视频号发布后，需要展示二维码
export async function sphQrCode (data) {
  const res = await request.post('/business/matrixsphpublish/sphQrCode', data)
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
